import { reactive, ref } from 'vue';
import { add, get, remove, update } from '@/services';
import { message, Modal } from 'ant-design-vue';

export default function useDetail(detail) {
  const isVisible = ref(false);

  const handleOk = () => {
    isVisible.value = false;
  };
  const handleCancel = () => {
    isVisible.value = false;
  };

  const showDetailModal = record => {
    isVisible.value = true;
    Object.assign(detail, record);
  };

  return {
    isVisible,
    handleOk,
    handleCancel,

    showDetailModal,
  };
}
